﻿Public Class Form8

    Private Sub Tbl_testBindingNavigatorSaveItem_Click(sender As System.Object, e As System.EventArgs) Handles Tbl_testBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.Tbl_testBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.Test4DataSet)

    End Sub

    Private Sub Form8_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'Test4DataSet.tbl_thu' table. You can move, or remove it, as needed.
        Me.Tbl_thuTableAdapter.Fill(Me.Test4DataSet.tbl_thu)
        'TODO: This line of code loads data into the 'Test4DataSet.tbl_test' table. You can move, or remove it, as needed.
        Me.Tbl_testTableAdapter.Fill(Me.Test4DataSet.tbl_test)
        Me.Tbl_testIUltraGrid.setDoiTuongXuLyDuLieu(Me.Test4DataSet.tbl_test, Me.Tbl_testBindingSource, Me.Tbl_testTableAdapter, Me.Test4DataSet)
        'Me.Tbl_testIUltraGrid.setChoPhepThemDong()
        Me.Tbl_testIUltraGrid.setChoPhepMenuStrip()
        Me.Tbl_testIUltraGrid.setChoPhepLuuXongKhongThemDong()
        'Me.Tbl_testIUltraGrid.setCapNhatDuLieuTucThoi()
        'Me.Tbl_testIUltraGrid.setGiaoDienVua()
        ' Me.Tbl_testIUltraGrid.setGiaoDienTuDong()
        Me.Tbl_testIUltraGrid.setGiaoDienTuyBien()

        Dim ht As Hashtable = New Hashtable
        ht.Add("ten", "ten")
        ht.Add("ghichu", "ghichu")
        Me.Tbl_testIUltraGrid.setThemIUltraDropDown(Me.Tbl_thuIUltraDropDown, Me.Test4DataSet.tbl_thu, ht)
        Me.Tbl_thuIUltraDropDown.setGiaoDien()
        Me.Tbl_thuIUltraGrid.setDoiTuongXuLyDuLieu(Me.Test4DataSet.tbl_thu, Me.Tbl_thuBindingSource, Me.Tbl_thuTableAdapter, Me.Test4DataSet)
        Me.Tbl_thuIUltraGrid.setChoPhepMenuStrip()
        Me.Tbl_thuIUltraGrid.setGiaoDienVua()
        Me.Tbl_thuIUltraGrid.setUltraComboEditor(Me.UltraComboEditor1)
        Me.Tbl_thuIUltraGrid.setChoPhepThemDong()
    End Sub

    Private Sub UltraButton1_Click(sender As System.Object, e As System.EventArgs) Handles UltraButton1.Click
        Me.Tbl_testIUltraGrid.getTaoMoi()
    End Sub


    Private Sub UltraButton3_Click(sender As System.Object, e As System.EventArgs) Handles UltraButton3.Click
        Me.Tbl_testIUltraGrid.getLuu()
    End Sub

    Private Sub UltraButton2_Click(sender As System.Object, e As System.EventArgs) Handles UltraButton2.Click
        Me.Tbl_testIUltraGrid.getXoa()
    End Sub

    Private Sub UltraButton5_Click(sender As System.Object, e As System.EventArgs) Handles UltraButton5.Click
        Me.Tbl_testIUltraGrid.getRefresh()
    End Sub

    Private Sub UltraButton4_Click(sender As System.Object, e As System.EventArgs) Handles UltraButton4.Click
        Me.Dispose()
        Me.Close()
    End Sub
End Class